<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('标签数据列表')" />
</head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								标签ID：<input type="text" name="tagId"/>
							</li>

							<li>
								rssi基站ID：<input type="text" name="rssiLocator"/>
							</li>

							<li>
								报警状态：<input type="text" name="status"/>
							</li>

							<li>
								传感类型：<input type="text" name="sensorType"/>
							</li>

							<li>
								人员ID：<input type="text" name="personId"/>
							</li>

							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm" id="toolbar" role="group">
<!--				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:tagLatestData:export">-->
<!--						<i class="fa fa-download"></i> 导出-->
<!--				 </a>-->
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:tagLatestData:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:tagLatestData:remove')}]];
        var prefix = ctx + "system/tagLatestData";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "标签数据",
		        showExport: false,
				uniqueId:"id",
                columns: [
                // 		{
		        //     checkbox: true
		        // },
				{
					title: "序号",
					formatter: function (value, row, index) {
						return $.table.serialNumber(index);
					}
				},
				{
					field : 'id', 
					title : 'ID',
					visible: false
				},
				{
					field : 'tagId', 
					title : '标签ID',
					sortable: true
				},
				{
					field : 'positionTS',
					title : '位置信息时间',
					sortable: true
				},
				{
					field : 'lastPacketTS', 
					title : '数据产生时间',
					sortable: true
				},
				{
					field : 'x', 
					title : 'X',
					sortable: true
				},
				{
					field : 'y', 
					title : 'Y',
					sortable: true
				},
				{
					field : 'z', 
					title : 'Z',
					sortable: true
				},
				{
					field : 'batteryVoltage', 
					title : '电池电量',
					sortable: true
				},
				{
					field : 'batteryVoltageTS', 
					title : '电池电量对应的时间',
					sortable: true
				},
				{
					field : 'rssi', 
					title : '信号强度',
					sortable: true
				},
				{
					field : 'rssiLocator', 
					title : 'rssi基站ID',
					sortable: true
				},
				{
					field : 'status', 
					title : '报警状态',
					sortable: true
				},
				{
					field : 'sensorType', 
					title : '传感类型',
					sortable: true
				},
				{
					field : 'sensorData', 
					title : '传感值',
					sortable: true
				},
				{
					field : 'personId', 
					title : '人员ID',
					sortable: true
				},
				{
					field : 'createTime',
					title : '创建时间',
					sortable: true
				},
				{
					field : 'updateTime', 
					title : '更新时间',
					sortable: true
				},
		        // {
		        //     title: '操作',
		        //     align: 'center',
		        //     formatter: function(value, row, index) {
		        //     	var actions = [];
		        //     	// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                //         // actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
				// 		return actions.join('');
		        //     }
		        // }
		        ]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>